// MainFrm.h : interface of the CMainFrame class
//


#pragma once

#include "HPFile.h"
#include "config.h"

class CMainFrame : public CXTPMDIFrameWnd
{
	DECLARE_DYNAMIC(CMainFrame)
public:
	CMainFrame();

// Attributes
public:
	
	OnTimerSig	 m_sigTimer;
	OnMatchSig	 m_sigMatch;

	HPData		 m_http;
	urls_type	 m_urls;
	int			 m_nInitStep;
	down_errors	 m_errs_down;
	std::map<int,down_errors> m_errs_parse;

	cbankers	 m_bankers_euro;
	cbankers	 m_bankers_asia;
	cgroup_leas  m_group_lea;
	cteams		 m_teams;


// Operations
public:
	void	SetNewTabLeft(BOOL bLeft=TRUE);

	void init();
	BOOL ReadInfor();
	void WriteInfor();
	BOOL getLeague(int id,cleague& lea);
	void getLeagues(cleagues& leas,int kind=-1);
	BOOL getMatch(int id,cmatch& mat);



	
// Overrides
public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);

// Implementation
public:
	virtual ~CMainFrame();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:  // control bar embedded members
	CXTPStatusBar  m_wndStatusBar;
	CXTPDockingPaneManager m_paneManager;
// 	CXTPOfficeBorder<CStatic> m_wndOptions;
// 	CXTPOfficeBorder<CEdit> m_wndProperties;
	CView* m_pwndLive;
	CView* m_pwndOver;
	CView* m_pwndFav;
	CXTPTabClientWnd m_MTIClientWnd;

public:
	//
private:
	//

// Generated message map functions
protected:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnClose();
	afx_msg void OnDestroy();
	afx_msg void OnCustomize();
	afx_msg LRESULT OnDockingPaneNotify(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnHttp(WPARAM wParam, LPARAM lParam);
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnTimer(UINT_PTR nIDEvent);
	afx_msg void OnToolsItem(NMHDR* pNMHDR, LRESULT* pResult);
};
